package stream.Demo04;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.IOException;

/**
 * @Author Miku
 * @Create 2021/4/29 14:46
 */
public class Test {
    public static void main(String[] args) throws IOException {
        //1.创建BufferedInputStream
        FileInputStream fis = new FileInputStream("e:\\aaa.txt");
        BufferedInputStream bis = new BufferedInputStream(fis);
        //2.读取
        int data = 0;
        while ((data = bis.read()) != -1) {
            System.out.print((char) data);
        }
        //3.关闭
        bis.close();
    }
}
